MODULES = .//moduleA .//moduleB
vpath = %.h ./include

all:$(MODULES) a.out

$(MODULES):ECHO
	make -C $@

ECHO:
	@echo $(MODULES)

a.out: main.c
	gcc $< -o ./RELEASE/$@ -I ./include -L./RELEASE -lshow -ldata -L/usr/lib/mysql -lmysqlclient

main.o:main.c
	gcc -c $< -o ./RELEASE/$@

.PHONY:clean all log

#删除库文件
clean:
	rm -rf ./RELEASE/*.o ./RELEASE/*.a ./RELEASE/*.so

#删除日志文件
log:
	rm -rf log.log
